﻿using System;
using System.Collections;
using System.Data;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;

using BingZi.HY.Core.Templates;

namespace BingZi.HY.UI.AshxPage
{
    /// <summary>
    /// $codebehindclassname$ 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class Default : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            context.Response.Write("Hello World");
            WriteHtml("default");
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
        private void WriteHtml(string path)
        {
            string headhtml = string.Empty;
            VelocityHelper VH = new VelocityHelper();
            VH.Init(string.Format(@"~/Skin/{0}", path));//模板路径
            VH.Put(TagFields.SITE_NAME, "测试用法");

            VH.Display("Default.html");
        }
    }
}
